import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const routes: Array<RouteRecordRaw> = [
  /*{
    path: '/',
    name: 'home',
    component: HomeView
  },*/
  {
    path: '/',
    name: 'home',
    component: () => import('../views/HomeView.vue'),
    children:[
      {
        path: 'sp',
        name: 'sp',
        component: () => import('../components/SP.vue')
      },
      {
        path: 'dm',
        name: 'dm',
        component: () => import('../components/dm.vue')
      },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
